<?php
namespace Admin\Controller;
use Think\Controller;
class AboutController extends ExtendController {
    public function index(){
    $imagesModel = D('About');
     $list = $imagesModel->order('id desc')->find();
     $list['content'] = html_entity_decode($list['content']);
     if($list){
     	$this->assign('list',$list);
         
     }
 $this->display();  
   }

   public function save(){
    $id = $_POST['id'];
     $data['content'] = htmlspecialchars($_POST['data']);
   $res = D('About')->where('id='.$id)->save($data);
   if($res){
       echo json_encode(array("status" =>1, "data" =>'保存成功' ));
        exit ;
   }else{
       echo json_encode(array("status" =>0, "data" =>'没有修改' ));
        exit ;

   }
}






}